package com.venue.ui.config;

import com.jfinal.config.Constants;
import com.jfinal.config.Handlers;
import com.jfinal.config.Interceptors;
import com.jfinal.config.JFinalConfig;
import com.jfinal.config.Plugins;
import com.jfinal.config.Routes;
import com.jfinal.kit.PropKit;
import com.jfinal.render.ViewType;
import com.venue.ui.controller.MessageController;
import com.venue.ui.controller.NoticeController;
import com.venue.ui.controller.StoryController;
import com.venue.ui.controller.StyleController;
import com.venue.ui.controller.SystemController;
import com.venue.ui.controller.TributeController;
import com.venue.ui.controller.UserController;
import com.venue.ui.controller.VenueController;
import com.venue.ui.controller.WorshipController;

public class AppConfig extends JFinalConfig {

	public void configConstant(Constants me) {
		PropKit.use("config.properties");
		me.setDevMode(true);
		me.setBaseViewPath("/WEB-INF/view");
		me.setViewType(ViewType.JSP);
	}

	public void configRoute(Routes me) {
		me.add("/user", UserController.class);
		me.add("/venue", VenueController.class);
		me.add("/message", MessageController.class);
		me.add("/story", StoryController.class);
		me.add("/tribute", TributeController.class);
		me.add("/worship", WorshipController.class);
		me.add("/system", SystemController.class);
		me.add("/style", StyleController.class);
		me.add("/notice", NoticeController.class);
	}

	public void configPlugin(Plugins me) {

	}

	public void configInterceptor(Interceptors me) {
	}

	public void configHandler(Handlers me) {
		me.add(new ContextPathHandler());
	}
}
